
#ifndef __CE_SCENE_IMPOSTEREFFECTCAMERA_H__
#define __CE_SCENE_IMPOSTEREFFECTCAMERA_H__

#include <export.h>
#include <gfx/camera.h>
#include <gfx/projector.h>
#include <scene/ieffectcamera.h>

struct iBillboardMesh;
class ceNode;
struct iRenderTarget;

/**
 * \addtogroup scene
 * @{
 */
/**
 * @brief Implementation of the iEffectCamera interface for generating textures for imposters.
 */
class CE_API ceImposterEffectCamera : public iEffectCamera
{
private:
  ceNode*               _node;

  ceCamera              _camera;
  ceProjector           _projector;

  iRenderTarget*        _renderTarget;
  float                 _rerenderAngle;
  ceVector3f            _lastDirection;
  bool                  _hasImage;

  iBillboardMesh*       _billboardMesh;

public:
  ceImposterEffectCamera();

  void SetNode (ceNode* node);
  void SetRenderTarget (iRenderTarget* renderTarget);
  void SetBillboardMesh (iBillboardMesh* mesh);


  virtual bool Update (ceRenderEnvironment& env, iDevice* device);

  virtual const ceCamera& GetCamera () const;
  virtual const ceProjector& GetProjector () const;
  virtual iRenderTarget* GetRenderTarget ();
  virtual ceNode* GetNode ();

};

/** @} */


#endif /* ! __CE_SCENE_IMPOSTEREFFECTCAMERA_H__ */

